/**
 * Fragment
 *    空标签组件
 *
 *    作用是：用作包裹元素的，类似于 Vue 中 template
 *
 */

import React, { Fragment } from "react";
import "./index.css";

class App extends React.Component {
  state = {
    isShow: false,
  };

  render() {
    const { isShow } = this.state;

    return (
      <div className="app">
        <div className="item">1</div>

        {isShow && (
          <>
            <div className="item">2</div>
            <div className="item">3</div>
          </>
        )}

        <div className="item">4</div>
      </div>
    );
  }
}

export default App;
